package com.masterclient.app.businessmodule.vipmodule.bean;

import android.text.TextUtils;

public class Level {

    /**
     * level : 1
     * level_bg : http://oss.xrkmall.com/upload_dev/images/8/6/a/86ad0398fede0c4d10e87c6d3aab5ba4.png
     * level_name : 注册会员
     * level_english_name : GENERAL
     * customer_exp : 0
     * level_exp : 0
     * check : true
     */

    private int level;
    private String level_bg;
    private String privilege_img;
    private String level_name;
    private String level_english_name;
    private String customer_exp;
    private String level_exp;
    private boolean check;
    private int currentLevel;
    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getLevel_bg() {
        return level_bg;
    }

    public void setLevel_bg(String level_bg) {
        this.level_bg = level_bg;
    }

    public String getLevel_name() {
        return level_name;
    }

    public void setLevel_name(String level_name) {
        this.level_name = level_name;
    }

    public String getLevel_english_name() {
        return level_english_name;
    }

    public void setLevel_english_name(String level_english_name) {
        this.level_english_name = level_english_name;
    }

    public float getCustomer_expF() {
        if(TextUtils.isEmpty(customer_exp))
            return 0;
        float exp = Float.parseFloat(customer_exp);
        if(exp == Float.parseFloat(customer_exp))
            return Float.parseFloat(customer_exp);
        return exp;
    }

    public String getCustomer_exp() {
        if(TextUtils.isEmpty(customer_exp))
            return "0";
        return customer_exp;
    }

    public void setCustomer_exp(String customer_exp) {
        this.customer_exp = customer_exp;
    }

    public float getLevel_expF() {
        if(TextUtils.isEmpty(level_exp))
            return 0;
        return Float.parseFloat(level_exp);
    }

    public String getLevel_exp() {
        if(TextUtils.isEmpty(level_exp))
            return "0";
        return level_exp;
    }

    public void setLevel_exp(String level_exp) {
        this.level_exp = level_exp;
    }

    public boolean isCheck() {
        return check;
    }

    public void setCheck(boolean check) {
        this.check = check;
    }

    public String getPrivilege_img() {
        return privilege_img;
    }

    public void setPrivilege_img(String privilege_img) {
        this.privilege_img = privilege_img;
    }

    public int getCurrentLevel() {
        return currentLevel;
    }

    public void setCurrentLevel(int currentLevel) {
        this.currentLevel = currentLevel;
    }

    public String getBtnText(){
        if(currentLevel == level)
            return "当前等级";
        else if(currentLevel<level)
            return "立即开通";
        else return "高于该等级";
    }
}
